package com.my.spring.task.core;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author Zijian Liao
 * @since 1.0.0
 */
public class MyJobRegister {

    private static final Map<String, JobInvocation> JOB_INVOCATION_MAP = new ConcurrentHashMap<>(8);

    public static void register(String jobName, JobInvocation jobInvocation){
        JOB_INVOCATION_MAP.put(jobName, jobInvocation);
    }

    public static JobInvocation get(String jobName){
        return JOB_INVOCATION_MAP.get(jobName);
    }
}
